/******************************************************************************/
/* @ All Rights Reserved Copyright (C) 2014 broada,Ltd.                       */
/*                                                                            */
/*  NAME      = fix_comm.h                                                    */
/*  NOTE      =                                                               */
/*  DATE      = 2015/10/18 by zhengxd                                         */
/******************************************************************************/
#ifndef __FIX_BASE_TYPE_H_
#define __FIX_BASE_TYPE_H_

#include "frmem.h"
#include "frstr.h"
#include "frcomm.h"
#include "frlist.h"
#include "frhash2.h"
#include "frlog.h"
#include "iconv2utf8.h"
#include "frsutl.h"
#include "frhex_dump.h"

#include "conntrack.h"
#include "module.h"
#include "frct_comm.h"
#include "frreport_comm.h"

#define FIX_SHO_LEN                            7     // 7 = [10=3bytes0x01]

#define FIX_MSG_TP_LOGON                       "A"    //Incoming/Outgoing
#define FIX_MSG_TP_HEARTBEAT                   "0"    //Incoming/Outgoing
#define FIX_MSG_TP_TEST_REQ                    "1"    //Incoming/Outgoing
#define FIX_MSG_TP_RESEND_REQ                  "2"    //Incoming/Outgoing
#define FIX_MSG_TP_REJECT                      "3"    //Outgoing
#define FIX_MSG_TP_SEQUENCE_REQ                "4"    //Incoming/Outgoing
#define FIX_MSG_TP_LOGOUT                      "5"    //Incoming/Outgoing
#define FIX_MSG_TP_NEW_ORDER_SINGLE            "D"    //Incoming
#define FIX_MSG_TP_ORDER_CANCEL_REQ            "F"    //Incoming
#define FIX_MSG_TP_ORDER_CANCEL_REPLACE_REQ    "G"    //Incoming
#define FIX_MSG_TP_ORDER_MASS_STATUS_REQ       "AF"   //Incoming
#define FIX_MSG_TP_ORDER_MASS_CANCEL_REQ       "q"    //Incoming
#define FIX_MSG_TP_ORDER_MASS_CANCEL_REPORT    "r"    //Outgoing
#define FIX_MSG_TP_MASS_QUOTE                  "I"    //Incoming
#define FIX_MSG_TP_QUOTE_CANCEL                "Z"    //Incoming
#define FIX_MSG_TP_QUOTE_ACKNOWLEDGMENT        "b"    //Outgoing
#define FIX_MSG_TP_EXECUTION_REPORT            "8"    //Outgoing
#define FIX_MSG_TP_SECURITY_DEFINITION_REQ     "c"    //Incoming
#define FIX_MSG_TP_SECURITY_DEFINITION         "d"    //Outgoing
#define FIX_MSG_TP_SECURITY_LIST_REQ           "x"    //Incoming
#define FIX_MSG_TP_SECURITY_LIST               "y"    //Outgoing
#define FIX_MSG_TP_NEWS_MESSAGE                "B"    //Outgoing
#define FIX_MSG_TP_UNKNOW_TRADE                "Q"    //Incoming
#define FIX_MSG_TP_ORDER_CANCEL_REJECT         "9"    //Outgoing

typedef struct __st_fix_param {

    unsigned int ui_tag;
    union
    {
        char *p_value;              /*  !< FRSTRING */
        Frbindata *p_st_value;      /*  !< FRCLOB FRBLOB */
    }field_value;
}Fix_param;

#endif
